Fix accessibility not getting initialized in gtk_init() if a default display is alrea...
authorChristoph Reiter <reiter.christoph@gmail.com>
Tue, 6 Oct 2015 22:00:35 +0000 (00:00 +0200)
committerChristoph Reiter <creiter@src.gnome.org>
Tue, 6 Oct 2015 22:19:32 +0000 (00:19 +0200)
commit263cbd90a063afa214855e52e88908853d7a2b8d
tree1ac4b91fd3ef415687a05d3bfd353abec29b060a
parentecb0e777fa4b07cf87c41fda4838ebf6448694c5
Fix accessibility not getting initialized in gtk_init() if a default display is already set

_gtk_accessibility_init() only gets called if the default
display changes, but in case gdk_init() is called before gtk_init()
the default display is already set and no property notification occurs.

This can happen quite easily in pygobject where
"from gi.repository import Gdk, Gtk"
will call gdk_init() followed by gtk_init() in the Python overrides.

This fixes it by checking for a default display in all cases.
gtk/gtkmain.c